package com.cdx.springcloud.controller;

import com.cdx.springcloud.entity.CommonResult;
import com.cdx.springcloud.entity.Payment;
import com.cdx.springcloud.service.PaymentFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author chedx
 * @data 2020/12/6 4:21 PM
 */
@RestController
@Slf4j
public class OrderFeignController {
    @Resource
    public PaymentFeignService paymentFeignService;

    @GetMapping(value = "/customer/payment/get/{id}")
    public CommonResult<Payment> getPaymentById(@PathVariable("id") Long  id)
    {
        CommonResult<Payment> res = paymentFeignService.getPaymentById(id);
        return res;
    }

    @GetMapping(value = "/customer/payment/time3")
    public String getFeignTimeout()
    {
        return paymentFeignService.getFeignTimeout();
    }

}
